package commitmsg

import (
	"context"
	"gitee.com/kmyss/gf-ex/yscmd"
)

type FlagPathBuilder struct {
	yscmd.FlagBuilderCore
}

func (b *FlagPathBuilder) Init(ctx context.Context, group ...string) {
	b.FlagBuilderCore.Init(ctx, group...)
	b.F.Short = "p"
	b.F.Long = "path"
	b.F.DefaultValue = "./commit-msg.txt"
	b.F.ConfigNodeName = "ys-cli.git.commit-msg"
	b.F.Description = `
    commit-msg 文件的路径,  git 钩子会提供此参数.`
}

func FlagPath(ctx context.Context) *yscmd.Flag {
	b := FlagPathBuilder{}
	b.Init(ctx)
	return b.Flag()
}
